package me.zhengjie.modules.finace_taxation.service;

import me.zhengjie.base.PageInfo;
import me.zhengjie.modules.finace_taxation.domain.FtActivity;
import me.zhengjie.modules.finace_taxation.service.dto.FtActivityDto;
import me.zhengjie.modules.finace_taxation.service.dto.FtActivityQueryParam;
import org.springframework.data.domain.Pageable;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Set;

/**
* @author 杨荣森
* @date 2021-06-23
*/
public interface FtActivityService {

    static final String CACHE_KEY = "ftActivity";

    /**
    * 查询数据分页
    * @param query 条件
    * @param pageable 分页参数
    * @return PageInfo<FtActivityDto>
    */
    PageInfo<FtActivityDto> queryAll(FtActivityQueryParam query, Pageable pageable);

    /**
    * 查询所有数据不分页
    * @param query 条件参数
    * @return List<FtActivityDto>
    */
    List<FtActivityDto> queryAll(FtActivityQueryParam query);

    FtActivity getById(String id);
    FtActivityDto findById(String id);

    /**
     * 插入一条新数据。
     */
    int insert(FtActivityDto resources);
    int updateById(FtActivityDto resources);
    int removeById(String id);
    int removeByIds(Set<String> ids);

    /**
    * 导出数据
    * @param all 待导出的数据
    * @param response /
    * @throws IOException /
    */
     void download(List<FtActivityDto> all, HttpServletResponse response) throws IOException;
}
